<template>
  <div>
    <el-form ref="data" :model="data" label-width="140px">
      <el-form-item label="创建时间:">
        <span>{{ data.createTime || "-" }}</span>
      </el-form-item>
      <el-form-item label="收货地址:">
        <span>{{ data.addressInfo || "-" }}</span>
      </el-form-item>
      <el-form-item label="联系电话:">
        <span>{{ data.addressMobile || "-" }}</span>
      </el-form-item>
      <el-form-item label="收件人:">
        <span>{{ data.addressName || "-" }}</span>
      </el-form-item>
      <el-form-item label="身份证号:">
        <span>{{ data.cardNumber || "-" }}</span>
      </el-form-item>
      <el-form-item label="运单id:">
        <span>{{ data.deliveryId || "-" }}</span>
      </el-form-item>
      <el-form-item label="快递类型:">
        <span>{{ data.deliveryType || "-" }}</span>
      </el-form-item>
      <el-form-item label="催货时间:">
        <span>{{ data.expeditingTime || "-" }}</span>
      </el-form-item>
      <el-form-item label="商品id:">
        <span>{{ data.goodsId || "-" }}</span>
      </el-form-item>
      <el-form-item label="id:">
        <span>{{ data.id || "-" }}</span>
      </el-form-item>
      <el-form-item label="邀请人id:">
        <span>{{ data.inviteId || "-" }}</span>
      </el-form-item>
      <el-form-item label="昵称:">
        <span>{{ data.nickName || "-" }}</span>
      </el-form-item>
      <el-form-item label="订单id:">
        <span>{{ data.orderId || "-" }}</span>
      </el-form-item>
      <el-form-item label="订单类型:">
        <span>{{ data.orderType == 1 ? "研学" : data.orderType == 2 ? "师训" : "文创" || "-" }}</span>
      </el-form-item>
      <el-form-item label="支付价格:">
        <span>{{ data.payPrice || "-" }}</span>
      </el-form-item>
      <el-form-item label="支付状态:">
        <span>{{ data.payStatus == 0 ? "未支付" : "已支付" || "-" }}</span>
      </el-form-item>
      <el-form-item label="支付时间:">
        <span>{{ data.payTime || "-" }}</span>
      </el-form-item>
      <el-form-item label="发货时间:">
        <span>{{ data.sendTime || "-" }}</span>
      </el-form-item>
      <el-form-item label="状态:">
        <span v-if="data.status == 0">待发货（待出发）</span>
        <span v-if="data.status == 1">已发货（已出发）</span>
        <span v-if="data.status == 2">已完成（已结束）</span>
      </el-form-item>
      <el-form-item label="总份数:">
        <span>{{ data.totalAmount || "-" }}</span>
      </el-form-item>
      <el-form-item label="总价:">
        <span>{{ data.totalPrice || "-" }}</span>
      </el-form-item>
      <el-form-item label="支付订单id:">
        <span>{{ data.transactionId || "-" }}</span>
      </el-form-item>
      <el-form-item label="用户id:">
        <span>{{ data.userId || "-" }}</span>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import { orderInfo, sendGoods } from "@/api/mini/order";
export default {
  props: {
    id: {
      type: String | Number,
      default: "",
    },
  },
  data() {
    return {
      data: {},
    };
  },
  created() {
    this.getOrderDetail();
  },
  methods: {
    getOrderDetail() {
      orderInfo(this.id).then((res) => {
        console.log(res);
        this.data = res.data;
      });
    },
  },
};
</script>
<style scoped lang="scss"></style>
